package com.memorypalace.deck.mapper;

import java.util.List;

import com.memorypalace.deck.vo.NoteAndCardStyleId;
import com.memorypalace.deck.vo.ScreenConditions;
import com.memorypalace.pojo.Card;
import com.memorypalace.pojo.CardStyle;
import com.memorypalace.pojo.StudyStatus;

public interface CardMapper {
	// 新增
	Boolean addCard(Card card);
	// 删除
	Boolean deleteCardByCardId(String cardId);
	// 不能运行
//	Boolean deleteCardByNoteId(String noteId);
	// 获取
	Card getCardByNoteAndCardStyleId(NoteAndCardStyleId nc);
	Card getCardByScreenConditions(ScreenConditions screenConditions);
	ScreenConditions getScreenConditionsByScreenConditions(ScreenConditions screenConditions);
	Integer getScreenConditionsCountByScreenConditions(ScreenConditions screenConditions);
	List<Card> getCardByNoteId(String noteId);
	List<CardStyle> getCardStyleByNotetyId(String noteTypeId);
	Card getCardByCardId(String cardId);
	List<Card> getCardWithCardStyleInWrongCount(String userId);
	// 今天学习情况
	Integer getStudyNewCountInToday(String userId);
	Integer getStudyReviewCountInToday(String userId);
	Integer getSpendTimeSumInToday(String userId);
	// 过去一个月学习情况
	List<StudyStatus> getStudyNewCountInThirtyDays(String userId);
	List<StudyStatus> getStudyReviewCountInThirtyDays(String userId);
	List<StudyStatus> getSpendTimeSumInThirtyDays(String userId);
	
	
	// 修改
	Boolean updateCardByCardId(Card card);
}
